package org.game.log;

import com.sojoys.artifact.tools.SK_Plus;
import org.game.log.builder.LogDsp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 副本日志
 * Created by fxf on 2017-12-29.
 */
public class LogDungeon implements IGameLogger {
    private LogDungeon() {
    }

    private static LogDungeon ME = new LogDungeon();

    public static LogDungeon me() {
        return ME;
    }

    private static Logger dungeonLogger = LoggerFactory.getLogger("dungeon");


    /**
     * 关卡日志
     * @param pid			玩家PID
     * @param dungeonCid	关卡ID
     * @param dungeonType	关卡类型
     * @param logDsp		备注
     */
    public void log(int pid, int dungeonCid,int dungeonType,boolean win,LogDsp logDsp) {
        SK_Plus sb = getPlayerInfo(pid);
        addField(sb, dungeonCid);
        addField(sb, dungeonType);
        addField(sb, win);
        addField(sb, logDsp.getDsp());
        addField(sb, logDsp.build());
        dungeonLogger.info(sb.e());
    }

}
